#include"processBar.h"
#include<string.h>
char bar[NUM];

void processbar(int rate){
  if(rate<0||rate>100)return;
  printf("[%-100s]""[%d%%]\r",bar,rate);
  fflush(stdout);
  bar[rate++]='*';
  if(rate<100)bar[rate]='>';

}

void initbar(){
  memset(bar,'\0',sizeof(bar));
}
